home *** CD-ROM | disk | FTP | other *** search
- Path: faatcrl.faa.gov!usenet
- From: ron thompson <thompsor@admin.tc.faa.gov>
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
- Subject: Re: C/C++ knocks the crap out of Ada
- Date: 27 Feb 1996 16:36:37 GMT
- Organization: aos-420
- Message-ID: <4gvbulINN1kb@faatcrl.faa.gov>
- References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com> <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com> <4 <dirk.824894312@demokrit> <4geuge$n56@qualcomm.com> <4gspbo$rjm@gaia.ns.utk.edu> <dewar.825427437@schonberg>
- NNTP-Posting-Host: 155.178.52.24
- X-Mailer: Mozilla 1.2 (Windows; U; 32bit)
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=us-ascii
-
- dewar@cs.nyu.edu (Robert Dewar) wrote:
- >Nasser asks
- >
- >": This is the essence of the Ada culture: top-down control where
- >: programmers are subordinates of the lead architects and managers.
- >
- >: Other languages -- specifically C++ -- focus on simplifying the
- >: programming activities while sacrificing some of the ease of control.
- >
- >Would somebody from Rational care to explain what aspects of C++ they believe
- >simplify the programming activity compared to Ada?"
- >
- >I am not from Rational :-)
- >
- >but here is my answer anyway, just one example.
- >
- >If a programmer wants to do a weird unchecked conversion, in C++ you just
- >go ahead and write a cast and that's the end of it.
- >
- >In Ada, you have to make a big production of things, with unchecked_Conversoin,
- >instantiated it, and then use it.
- >
- >Not only is this more work, but you might find some pesky rule saying that
- >only certain units in the program are permitted to with Unchecked_Conversion
- >(an example of top down control).
-
- Exactly. In our world, we consider that "big production of
- things" to be the tip off to the savvy reader/maintainer
- that SOMEthing is going to happen here that may or may
- not explicitly meet the eye. It is our experience that readers
- tend to glide the parenthesis, saving them for later study
- should they feel a need to. Cast via parenthetical indication
- is often overlooked until about the nth time through it.
-
- We like that glaring
- "... is new unchecked conversion(Something, Something_Else);"
-
- The conversion is then an actual call to a hopefully
- descriptive name that is just a tad harder to overlook then a
- call with a series of parenthetical notes as to what is being
- done.
-
- We also find that a good spot for commenting is just prior
- to a function/procedure call, so the habit of commenting is
- applied to the upcoming cast. It is easy to comment the next
- call yet forget that we are casting on the fly.
-
- The trade obviously is that it makes a few steps more in
- the process. The one I always enjoy is that it is far less
- typing in C/C++...
-
- As for top-down control, well we just always remember that
- no matter what the architecture, OS, or language, NObody
- knows the job like the engineers/programmers. Sure we are
- suboordinates to the top end, but hey, someone has to be.
- Besides, they provide us with such a rich variety of laughs...
-
- rct
-
- The opinion(s) expressed above are mine and mine alone.
-
-